<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>仪表盘 - FinalCMS Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<link rel="stylesheet" href="${ctx}/css/bootstrap.min.css" />
<link rel="stylesheet" href="${ctx}/css/font-awesome.min.css" />
<link rel="stylesheet" href="${ctx}/css/jquery-ui.custom.min.css" />

<!--[if lte IE 9]>
<link rel="stylesheet" href="${ctx}/css/fc-part2.min.css" />
<![endif]-->
<link rel="stylesheet" href="${ctx}/css/fc-skins.min.css" />
<link rel="stylesheet" href="${ctx}/css/fc-rtl.min.css" />
<link rel="stylesheet" href="${ctx}/css/fc-fonts.css" />
<link rel="stylesheet" href="${ctx}/css/fc.min.css" />
<link rel="stylesheet" href="${ctx}/css/fc-custom.css" />
<!--[if lte IE 8]>
<script src="${ctx}/js/html5shiv.js"></script>
<script src="${ctx}/js/respond.min.js"></script>
<![endif]-->

<!--[if lte IE 9]>
 <link rel="stylesheet" href="${ctx}/css/fc-ie.min.css" />
<![endif]-->
<script type="text/javascript" src='${ctx}/js/jquery1.11.0.min.js'></script>
</head>

<body class="no-skin">
<?include("../../inc/menu.html",{current:"friendlink"}){}?>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
	<script type="text/javascript">
		try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
	</script>

	<ul class="breadcrumb">
		<li><i class="ace-icon fa fa-home home-icon"></i> <a
			href="${ctx}/admin/account/dashboard">首页</a></li>
		<li class="active">查看文章</li>
	</ul>
</div>

<div class="page-content">
	<div class="page-header">
		<h1>友情链接
		<small><i class="ace-icon fa fa-angle-double-right"></i> 所有友链</small>
		</h1>
	</div>
	<div class="row">
		<? if(exist("page") && page != null){ ?>	
		<div class="table-container col-xs-12 table_page">
			<table id="content-table" class="table table-striped table-bordered table-hover table_page">
				<thead>
					<tr>
						<th class="center"></th>
						<th class="center">关键词</th>
						<th class="center">链接</th>
						<th class="center">logo</th>
						<th class="center">状态</th>
						<th class="center">操作</th>
					</tr>
				</thead>
				<tbody>
					<?for(ff in page.list!){?>
						<tr>
							<td class="center" width="5%">
								<label class="position-relative">
									<input type="checkbox" class="ace table_check" value="${ff.id!}" />
									<span class="lbl"></span>
								</label>
							</td>
							<td class="center" id="keyword_${ff.id!}" width="15%">${ff.keyword!}</td>
							<td class="center" width="25%">${ff.url!}</td>
							<td class="center" width="30%"><img alt="${ff.keyword!}" src="${ff.logo!}"></td>
							<td class="center" width="10%"><?if(ff.state == 1){print("启用");} else {print("禁用");}?></td>
							<td class="center" width="15%">
								<div class="action-buttons">
									<a href="${ctx}/admin/friendlink/edit?id=${ff.id!}" class="green edit-content">
										 <i class="ace-icon fa fa-pencil bigger-130" title="编辑"></i>
									</a> 
									<a href="${ctx}/admin/friendlink/lock?id=${ff.id!}" class="dark forbid-content forbid"> 
										<?if(1 == ff.state) {?>
										<i class="ace-icon fa fa-check-square-o bigger-130" title="启用"></i>
										<?} else {?>
										<i class="ace-icon fa fa-ban bigger-130" title="禁用"></i>
										<?}?>
									</a>
									<a href="${ctx}/admin/friendlink/delete?id=${ff.id!}" class="red del-content delete"> 
										<i class="ace-icon fa fa-trash-o bigger-130" title="删除"></i>
									</a>
								</div>
							</td>
						</tr>
					<?}?>
				</tbody>
			</table>
			<#pagination page="${page!}" formId="frm" />
		</div>
		<? } ?>		
		</form>
	</div>
</div>
</div>

<?include("../../inc/footer.html"){}?>

<script type="text/javascript" src="${ctx}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/js/fc-extra.min.js"></script>
<script type="text/javascript" src="${ctx}/js/fc.min.js"></script>
<script type="text/javascript" src="${ctx}/js/admin/util.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	
	//全选或者全不选
	$("#all_check").on("click",function(){
		selectAll($(this).get(0).checked, $(".table_check").toArray());
	});
	
});
</script>
	
</body>
</html>
